<html ng-app="diandanbao" class="ng-scope">
<head>
    <style type="text/css">@charset "UTF-8";
    [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
        display: none !important;
    }
    ng\:form {
        display: block;
    }</style>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta content="telephone=no" name="format-detection">
    <title>{$setting['title']}</title>

    <link rel="stylesheet" href="{RES}/plugin/light7/light7.min.css">
    <link rel="stylesheet" type="text/css" href="{php echo $this->cur_mobile_path}/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="{php echo $this->cur_mobile_path}/css/iconfont.css"/>

    <link data-turbolinks-track="true" href="{RES}/mobile/{php echo $this->cur_tpl}/assets/diandanbao/weixin.css?v=1" media="all" rel="stylesheet">
    <style type="text/css">@media screen{.smnoscreen {display:none}} @media print{.smnoprint{display:none}}</style>
</head>
<body>

<div class="ng-scope">
    <div class="ddb-nav-header ng-scope">
        <div class="nav-left-item"  onclick="javascript :history.back(-1);"><i class="fa fa-angle-left"></i></div>
        <div class="header-title ng-binding">我的订单</div>
    </div>
    {php include $this->template($this->cur_tpl.'/_nave');}
    <div class="orders-index-page main-view ng-scope"  style="height: 100%;overflow: scroll ;overflow-y:scroll;-webkit-overflow-scrolling:touch;">
        {loop $order_list $items}
        <div class="space-12"></div>
        <div class="order-item section ng-scope">
            <a class="list-item">
                <div class="time">下单时间：{php echo date('Y-m-d H:i:s',$items['dateline'])}</div>
            </a>
            <a class="list-item" onclick="go_detail({$items['id']})">
                <div class="name">
                    [{if $items['dining_mode']==1}堂点
                    {elseif  $items['dining_mode']==2}外卖
                    {elseif $items['dining_mode']==3}预订
                    {elseif $items['dining_mode']==4}快餐
                    {elseif $items['dining_mode']==5}收银
                    {elseif $items['dining_mode']==6}充值{/if}]
                    {if empty($storelist[$items['storeid']]['title'])}平台{else}{$storelist[$items['storeid']]['title']}{/if}
                    <div class="operation" style="font-size: 14px;">
                        {if $items['ispay']==4}退款失败{/if}
                        {if $items['ispay']==3}已退款{/if}
                        {if $items['ispay']==2}待退款{/if}
                        {if $items['ispay']==1}<i class="fa fa-check-square-o"></i>已支付{/if}
                        {if $items['ispay']==0}未支付{/if}
                    </div>
                </div>
                {if $items['dining_mode']==3}
                <div class="total-amount">预订房号：{$items['table_title']}房</div>
                <br />预订到店时间：{$items['meal_time']}
                {/if}
                {if $items['dining_mode']==1}
                <div class="total-amount">桌号：{$items['table_title']}</div>
                <br />
                {/if}
                <div class="variants overflow-ellipsis">
                    共计{$items['totalnum']}件商品 {if $items['is_append']==1}(<font color="#f00">加单!</font>){/if}
                </div>
            </a>
            <div class="list-item">
                <div class="total-amount"><span class="amount-label">金额：</span>￥{$items['totalprice']}</div>
                <div class="operation">
                    {if $items['status']==0}
                    {php $lbl_color = 'label-default';}
                    {php $lbl_stauts = '未确认';}
                    {elseif $items['status']==1}
                    {php $lbl_color = 'label-green';}
                    {php $lbl_stauts = '已确认';}
                    {elseif $items['status']==3}
                    {php $lbl_color = 'label-green';}
                    {php $lbl_stauts = '已完成';}
                    {elseif $items['status']==-1}
                    {php $lbl_color = 'label-red';}
                    {php $lbl_stauts = '已取消';}
                    {/if}
                    <span class="button {$lbl_color}">
                        {$lbl_stauts}
                    </span>
                    {if $items['status']==3}
                    {if $items['isfeedback']==0}<span class="button label-orange" onclick="go_feedback({$items['id']})">
                    待评价</span>{/if}
                    {/if}
                </div>
                <div class="space"></div>
            </div>
        </div>
        {/loop}
        <div style="height:100px;"></div>
    </div>
</div>
<script>
    function jump(status) {
        window.location.href = "{php echo $this->createMobileUrl('order', array(), true)}" + "&status=" + status;
    }

    function go_detail(id) {
        window.location.href = "{php echo $this->createMobileUrl('orderdetail', array(), true)}" + "&orderid=" + id;
    }

    function go_feedback(id) {
        window.location.href = "{php echo $this->createMobileUrl('feedback', array(), true)}" + "&orderid=" + id;
    }
</script>
</body>
</html>